package com.shop.cereshop.agent.service.redis;

import com.shop.cereshop.commons.exception.CoBusinessException;

public interface CereRedisKeyService {
  /**
   * 添加延时任务
   */
  void add(String key, String endTime) throws CoBusinessException;

  /**
   * 更新延时任务
   */
  void updateByKey(String key, String endTime) throws CoBusinessException;

  /**
   * 删除延时任务
   */
  void deleteByKey(String key) throws CoBusinessException;

  /**
   * 初始化 Redis 延时任务
   */
  void initializationRedis() throws CoBusinessException, Exception;

  /**
   * 根据 key 查询任务截止时间
   */
  String findByKey(String key);
}
